package de.mp3player.gui;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.*;

import de.lunaplayer.view.bars.Menupanel;
import de.mp3player.helpers.LNFSetter;

public class Gui extends JFrame{
	
	private Menupanel menupanel;
	private ControllerPanel ctlpanel;
	private LeftPanel leftpanel;
	private MainContentPanel contentpanel;
	private Rightpanel rightpanel;
	
	private String motif = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
	private String java = "javax.swing.plaf.metal.MetalLookAndFeel";
	private String msw = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
	private String macos = "com.sun.java.swing.plaf.mac.MacLookAndFeel";
	
	public Gui(){
		this.setLayout(new BorderLayout());
		this.menupanel = new Menupanel();
		this.ctlpanel = new ControllerPanel();
		this.leftpanel = new LeftPanel();
		this.contentpanel = new MainContentPanel();
		this.rightpanel = new Rightpanel();
		add(menupanel,BorderLayout.NORTH);
		add(ctlpanel,BorderLayout.SOUTH);
		add(leftpanel,BorderLayout.WEST);
		add(contentpanel,BorderLayout.CENTER);
		add(rightpanel,BorderLayout.EAST);
		//initLookAndFeel();
		pack();
	}

	private void initLookAndFeel() {
		ButtonGroup bg = new ButtonGroup();
		JRadioButton bmotif = new JRadioButton();
		bmotif.addActionListener(new LNFSetter(motif,bmotif,this));
		bg.add(bmotif);
		add(bmotif);
		
		JRadioButton bjava = new JRadioButton();
		bjava.addActionListener(new LNFSetter(java,bjava,this));
		bg.add(bjava);
		add(bjava);
		
		JRadioButton bmsw = new JRadioButton();
		bmotif.addActionListener(new LNFSetter(msw,bmsw,this));
		bg.add(bmsw);
		add(bmsw);
		
		JRadioButton bmac = new JRadioButton();
		bmac.addActionListener(new LNFSetter(macos,bmac,this));
		bg.add(bmac);
		add(bmac);
		
	}

}
